package request

import (
	"gitee.com/cjsn/topsdk/ability254/domain"
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardExtrachargeCreateRequest struct {
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   额外收费项列表     */
	ExtraChargeItemList *[]domain.TmallServicecenterWorkcardExtrachargeCreateWorkcardExtraChargeCreateTuple `json:"extra_charge_item_list" required:"true" `
}

func (s *TmallServicecenterWorkcardExtrachargeCreateRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardExtrachargeCreateRequest {
	s.WorkcardId = &v
	return s
}
func (s *TmallServicecenterWorkcardExtrachargeCreateRequest) SetExtraChargeItemList(v []domain.TmallServicecenterWorkcardExtrachargeCreateWorkcardExtraChargeCreateTuple) *TmallServicecenterWorkcardExtrachargeCreateRequest {
	s.ExtraChargeItemList = &v
	return s
}

func (req *TmallServicecenterWorkcardExtrachargeCreateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.ExtraChargeItemList != nil {
		paramMap["extra_charge_item_list"] = util.ConvertStructList(*req.ExtraChargeItemList)
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardExtrachargeCreateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
